<%@page contentType="text/html; charset=UTF-8" language="java" %>
<%@page pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@page import="com.kcs.common.utils.Constant"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>Popup Customer</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.js"></script>
<script type="text/javascript" src="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.pack.js"></script>    
<script type="text/javascript" src="jsp/script/common.js"></script>  
<link rel="stylesheet" type="text/css" href="jsp/script/jquery/plugin/fancybox/jquery.fancybox-1.3.4.css"/>
<link rel="stylesheet" type="text/css" href="jsp/css/table.css"/>
<script type="text/javascript">
	var g_dataPopup;

	$(document).ready(function() {
		jQuery("#pAction").val("init");
	});
	
	function resetFunction(){
		loading();
		jQuery("#pAction").val("init");
		submitform();
	}
	
	function searchUserProFile(){
		loading();
		jQuery("#pAction").val("search");
		submitform();
	}

	function onSelectRow(data){
		window.parent.select(data);
	}

</script>
</head>
<body>
<center>
<div style="width:95%" align="center">
	<html:form action="/PopupCustomerAction.do">
		<html:hidden property="pAction" styleId="pAction"/>
		<table width="100%" class="MarginHeader">
			<tr>
				<td align="left">Customer Information</td>
			</tr>
		</table>
		
		<div class="CriteriaBox">
			<table width="100%" class="MarginCriteria">
				<tr>
					<td width="50%" align="right">CIF No. :</td>
					<td width="50%" align="left" ><html:text property="pCifNo"></html:text></td>
				</tr>
				<tr>
					<td width="50%" align="right">Customer Name :</td>
					<td width="50%" align="left" ><html:text property="pCustomerName"></html:text></td>
				</tr>			
			</table>
			
			<table width="100%">
				<tr>
					<td width="50%" align="center"><input type="button" class="button" value="Search" onclick="searchUserProFile();"/></td>
					<td width="50%" align="center"><input type="button" class="button" value="Reset" onclick="resetFunction();"/></td>
				</tr>
			</table>
		</div>
		
		<logic:present name="<%=Constant.SHOW_RESULT%>">
			<div class="MarginTable">
				<display:table id="data" name="sessionScope.PopupCustomerActionForm.customerInformationBOList" requestURI="/PopupCustomerAction.do" pagesize="10" >
					
					<display:column title="No" sortable="false" class="center">
						<input type="radio" name="row" onclick="onSelectRow({${data.jsonObject}});" /> ${data.rowNum }
					</display:column>
					<display:column property="cifNo"   			title="CIF No."  		sortable="false" class="center"/>
					<display:column property="customerName" 	title="Customer Name" 	sortable="false" class="left"/>				
					<display:column property="marginAccNo" 		title="Margin A/C No." 	sortable="false" class="center"/>		
					<display:column property="marginAccName"	title="Margin A/C Name" sortable="false" class="left"/>	
				</display:table>
			</div>
		</logic:present>

	</html:form>	
	<%@ include	file="../include/footer.jsp"%> 
</div>
</center>

</body>
</html>